package DynamicProxy;

import java.lang.reflect.Proxy;

/**
 * @author ：MJS
 * @date ：Created in 2021/6/1  23:04
 * @description：TODO
 */
public class CarApp {
    public static void main(String[] args) {
        BuyCarImpl buyCar = new BuyCarImpl();
        BuyCar proxyBuyCar = (BuyCar) Proxy.newProxyInstance(BuyCar.class.getClassLoader(),
                new Class[]{BuyCar.class},
                new DynamicProxyHandler(buyCar));
        proxyBuyCar.buyCar();
    }
}
